﻿namespace Miao.ML
{
	public class DoubleData : WinMLData
	{
		public double value { get; set; }

		public sealed override DataType type => DataType.Double;

		public static string ToString(object value)
		{
			return $"{value}{'d'}";
		}

		public DoubleData()
		{
		}

		public DoubleData(double value)
		{
			this.value = value;
		}

		public override void SetValueByText(string text)
		{
			value = double.Parse(text);
		}

		public override string ToString()
		{
			return ToString(value);
		}
	}
}
